/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Lily
 * Date: 2024-10-15
 * Time: 19:47
 */
public class test_3 {
    /**
     * 代码中的类名、方法名、参数名已经指定，请勿修改，直接返回方法规定的值即可
     *
     * @param numbers int整型一维数组
     * @return bool布尔型
     */
    public boolean IsContinuous(int[] numbers) {
        int max_n = -1;
        int min_n = 14;
        for (int i = 0; i < numbers.length; i++) {
            if (numbers[i] != 0) {
                if (numbers[i] == max_n || numbers[i] == min_n) {
                    return false;
                } else {
                    max_n = Math.max(max_n, numbers[i]);
                    min_n = Math.min(min_n, numbers[i]);
                }
            }
        }
        int flag = max_n - min_n + 1;
        if (flag > numbers.length) {
            return false;
        }
        return true;

    }
}
